package demo3;

abstract class Animal {
    public int age;

    public Animal(int age) {
        this.age = age;
    }

    public void fun () {
        System.out.println("Animal fun()");
    }
    public abstract void walk ();
}
abstract class Dog extends Animal{
    public Dog(int age) {
        super(age);
    }

    public abstract void eat ();
}
class DollDog extends Dog{
    public DollDog(int age) {
        super(age);
    }

    @Override
    public void walk() {

    }

    @Override
    public void eat() {

    }
}
class Cat extends Animal{
    public Cat(int age) {
        super(age);
    }

    @Override
    public void walk() {
        System.out.println("小猫在走路..");
    }
}
abstract class A {
    public void fun () {
        System.out.println("艺颗码心");
    }
}
public class Test {
    public static void main(String[] args) {
        //Animal animal = new Animal();
    }
}
